<div class="panel index">
	<h1><?php __('Email Addresses'); ?></h1>
	<ul class="list">
	<?php
		$i = 0;
		foreach($contact['Email'] as $email) {
			echo '<li'.(($i++%2==0)?' class="altrow"':'').'>';
					echo $html->link($email['email'], 'mailto:'.$email['email'], array('class'=>'small'));
					echo '<br />';
					echo '(<i class="small">'.h($GLOBALS['email_types'][$email['kind']]).(($email['primary'])?', '.__('primary', true):'').'</i>)';
			echo '<div class="flyout" id="ContactEmailFlyOut'.$email['id'].'">';
					echo $html->link($html->image('/img/edit.gif'), 
						array('controller'=>'emails', 'action'=>'edit', $email['id']),
						null, null, false);
					echo $html->link($html->image('/img/delete.gif'), 
						array('controller'=>'emails', 'action'=>'delete', $email['id']),
						null, __('Are you sure?', true), false);
			echo '</div>';
			echo '</li>';	
		}
	?>
	</ul>
	<div class="actions">
		<?php echo $html->image('add.gif').' '.$html->link(__('Add new Email', true), array('controller'=>'emails', 'action'=>'add', $contact['Contact']['id'])); ?>
	</div>
</div>
<div class="panel index">
	<h1><?php __('Phone Numbers'); ?></h1>
	<ul class="list">
	<?php
		$i = 0;
		foreach($contact['Phone'] as $phone) {
			echo '<li'.(($i++%2==0)?' class="altrow"':'').'>';
			echo '<b>'.h($phone['no']).'</b> (<i class="small">'.h($GLOBALS['phone_types'][$phone['kind']]).'</i>)';
				echo '<div class="flyout" id="ContactPhoneFlyOut'.$phone['id'].'">';
				echo $html->link($html->image('/img/edit.gif'), 
					array('controller'=>'phones', 'action'=>'edit', $phone['id']),
					null, null, false);
				echo $html->link($html->image('/img/delete.gif'), 
					array('controller'=>'phones', 'action'=>'delete', $phone['id']),
					null, __('Are you sure?', true), false);
				echo '</div>';
			echo '</li>';			
		}
	?>
	</ul>
	<div class="actions">
		<?php echo $html->image('add.gif').' '.$html->link(__('Add new Phone No', true), array('controller'=>'phones', 'action'=>'add', $contact['Contact']['id'])); ?>
	</div>
</div>
<div class="panel index">
	<h1><?php __('Addresses'); ?></h1>
	<ul class="list">
	<?php
		$i = 0;
		foreach($contact['Address'] as $address) {
			echo '<li'.(($i++%2==0)?' class="altrow"':'').'>';
					echo h($address['street']).'<br />';
					//echo h($address['city']).'<br />';
					echo h($address['zip'].' '.$address['city']).'<br />';
					echo h($address['country']).'<br />';
					echo '(<i class="small">'.h($GLOBALS['address_types'][$address['kind']]).'</i>)';
					echo '<div class="flyout" id="ContactAddressFlyOut'.$address['id'].'">';
					echo $html->link($html->image('/img/edit.gif'), 
						array('controller'=>'addresses', 'action'=>'edit', $address['id']),
						null, null, false);
					echo $html->link($html->image('/img/delete.gif'), 
						array('controller'=>'addresses', 'action'=>'delete', $address['id']),
						null, __('Are you sure?', true), false);
					echo '</div>';
			echo '</li>';			
		}
	?>
	</ul>
	<div class="actions">
		<?php echo $html->image('add.gif').' '.$html->link(__('Add new Address', true), array('controller'=>'addresses', 'action'=>'add', $contact['Contact']['id'])); ?>
	</div>
</div>